package com.relax.tmall;

public class Product  implements Runnable {
    private Tmall tmall;

    public Product(Tmall tmall) {
        this.tmall = tmall;
    }

    public void run() {
        while (true){
            try {
                tmall.tack();
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
            try {
                Thread.sleep(1000);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }

        }
    }
}
